

//Responses.ts

//FaqModel
declare interface FaqModel {
  question?: string;
  answer?: string;
  showAnswer?: boolean,
}

//ResData<T>
declare interface ResData<T> {
  code?: string;
  message?: string;
  data?: T;
}

//CartContentModel
declare interface CartContentModel {
  id?: number;
  commodityId?: number;
  name?: string;
  image?: string;
  price?: number | string;
  count?: number;
  choose?: boolean,//是否选中
  status?:string
}

//UserProfile
declare interface UserProfile {
  nickname?: string;
  avatar?: string;
  phone?: string;
  major?: boolean;
}

//OrderCounts
declare interface OrderCounts {
  payingCount?: number;
  processingCount?: number;
  postSaleCount?: number;
}

//CouponCounts
declare interface CouponCounts {
  breakCount?: number;
  minusCount?: number;
  exchangeCount?: number;
}

//EventModel
declare interface EventModel {
  id?: number;
  name?: string;
}

//BannerModel
declare interface BannerModel {
  image?: string;
}

//CourseModel
declare interface CourseModel {
  id?: number;
  title?: string;
  coverImage?: string;
  video?: string;
  duration?: number | string;
}

//DistrictModel
declare interface DistrictModel {
  id?: number;
  name?: string;
}

//AddressModel
declare interface AddressModel {
  id?: number;
  name?: string;
  phone?: string;
  districts?: DistrictModel[];
  districtFullName?: string;
  detailAddress?: string;
  isDefault?: boolean;
}

//OrderContentModel
declare interface OrderContentModel {
  id?: number;
  name?: string;
  image?: string;
  price?: number | string;
  count?: number;
  couponId?: number;
  couponName?: string;
  couponDesc?: string;
  commodityId?: number;
  couponAmount?: number | string;
  usableCouponCount?: number,//可用的优惠券数量
  cartContentId?: number,//购物车ID
}

//PreviewOrderResult
declare interface PreviewOrderResult {
  address?: AddressModel;
  orderContents?: OrderContentModel[];
  couponId?: number;
  couponName?: string;
  couponDesc?: string;
  commodityAmount?: number | string;
  shippingCost?: number | string;
  couponDiscount?: number | string;
  totalAmount?: number | string;
}

//CreateOrderResult
declare interface CreateOrderResult {
  id?: number;
  payRequired?: boolean;
}

//OrderModel
declare interface OrderModel {
  id?: number;
  orderNo?: string;
  status?: any;
  orderTime?: number | string;
  totalAmount?: number | string;
  paymentCountdown?: number;
  receiverName?: string;
  receiverPhone?: string;
  receiverAddress?: string;
  couponName?: string;
  couponDesc?: string;
  orderContents?: OrderContentModel[];
  remark?: string;
  commodityAmount?: number | string;
  shippingCost?: number | string;
  couponAmount?: number | string;
  payType?: any;
  sendBackName?: string;
  sendBackPhone?: string;
  sendBackAddress?: string;
  sendBackShipCompany?: string;
  sendBackShipNo?: string;
  wxPayMerchantId?: string;
  wxPayOutTradeNo?: string;
}

//PageData<E>
declare interface PageData<E> {
  list?: E[];
  totalCount?: number;
  totalPage?: number;
  page?: number;
  pageSize?: number;
}

//CouponModel
declare interface CouponModel {
  id?: number;
  type?: any;
  name?: string;
  description?: string;
  expireTime?: number | string;
  value?: string;
}

//ReportModel
declare interface ReportModel {
  id?: number;
  time?: number | string;
  reportName?: string;
  name?: string;
  phone?: string;
  explainStatus?: any;
  pdfUrl?: string;
  sampleCode?: string,
  gender?: string,
  sampleTime?: string,
  explainName?: string,
  explainPhone?: string,
  explainRemark?: string,
  explainTime?: string,
  explainInfo?: string,
  explainAppointmentTime?: string,
  choose?: boolean
}

//MessageModel
declare interface MessageModel {
  id?: number;
  title?: string;
  content?: string;
  read?: boolean;
  time?: number | string
}

//TestingModel
declare interface TestingModel {
  id?: number;
  sampleCode?: string;
  icon?: string;
  testingName?: string;
  name?: string;
  gender?: any;
  status?: any;
  age?: number;
  reportPdfUrl?: string;
  phone?: string,
}

//ResellerInfo
declare interface ResellerInfo {
  status?: any;
  nickname?: string;
  avatar?: string;
  phone?: string;
  inviteCode?: string;
  inviteQrContent?: string;
  inviteUserCount?: number;
  inviteOrderCount?: number;
}

//InvitedUser
declare interface InvitedUser {
  time?: number | string;
  nickname?: string;
  avatar?: string;
  phone?: string;
}

//InvitedOrder
declare interface InvitedOrder {
  time?: number | string;
  nickname?: string;
  avatar?: string;
  phone?: string;
  orderNo?: string;
  orderAmount?: number | string;
}

//CommodityModel
declare interface CommodityModel {
  id?: number;
  name?: string;
  image?: string;
  price?: number | string;
  hasOriginalPrice?: boolean;
  originalPrice?: number | string;
  sales?: number;
  stock?: number;
  topImages?: string[];
  detailImages?: string[];
}

//CategoryModel
declare interface CategoryModel {
  id?: number;
  name?: string;
  isGroup?: boolean;
  choose?: boolean;
  children?: CategoryModel[];
}

//CheckSampleCodeResult
declare interface CheckSampleCodeResult {
  validate?: boolean;
}
declare interface BatchBandResult {
  index?: number;
  success?: boolean;
  message?: string;
}

//ExtraFieldModel
declare interface ExtraFieldModel {
  id?: number;
  name?: string;
  required?: boolean;
  value?: string
}

//TestingItemModel
declare interface TestingItemModel {
  id?: number;
  name?: string;
  extraFields?: ExtraFieldModel[];
  sampleType?: SampleTypeModel
}

//BoundSampleModel
declare interface BoundSampleModel {
  id?: number;
  time?: number | string;
  testingItemName?: string;
  code?: string;
  name?: string;
  phone?: string;
}

//CallExpressLogModel
declare interface CallExpressLogModel {
  id?: number;
  time?: string | number;
  senderName?: string;
  senderPhone?: string;
  senderAddress?: string;
  sampleTypeName?: string;
  receiverName?: string;
  receiverPhone?: string;
  receiverAddress?: string;
  orderNo?: string
}
declare interface CallExpressUsableTime {
  timeType?: string;
  description?: string;
}
declare interface ExpressTraceModel {
  time?: number | string;
  content?: string;
}
declare interface ExpressTrace {
  expressCompany?: string;
  expressNo?: string;
  receiverName?: string;
  receiverPhone?: string;
  receiverAddress?: string;
  traceDataList?: ExpressTraceModel[];
}

//SampleTypeModel
declare interface SampleTypeModel {
  id?: number;
  name?: string;
  receiverName?: string;
  receiverPhoen?: string;
  receiverAddress?: string;
}

//UploadParamModel
declare interface UploadParamModel {
  filepath?: string;
  readUrl?: string;
  method?: string;
  url?: string;
  headers?: Map<string, string>;
}
